namespace LambdaGp.Core.GeneticOperator
{
    public abstract class GeneticOperator
    {
        protected GeneticOperator(Population population)
        {
            Population = population;
        }

        protected Population Population { get; private set; }
        public void Execute(Individual individual)
        {
            individual.OperatorTree = Execute(individual.OperatorTree, Population.GenomeDefinition);
        }

        public abstract OperatorNode Execute(OperatorNode operatorNode, GenomeDefinition genomeDefinition);
    }
}
